function login(){
	var name =document.getElementById("trafficContractName").value ;
	var upload =document.getElementsByName("upload").value ;
	var contractCustomer = document.getElementById("trafficContractCustomer").value ;
	var trafficContractDate = document.getElementById("trafficContractDate").value ;
	var trafficContractSummarize = document.getElementById("trafficContractSummarize").value ;
	var trafficContractAmount = document.getElementById("trafficContractAmount").value ;
	var trafficContractStart = document.getElementById("trafficContractStart").value ;
	var trafficContractEnd = document.getElementById("trafficContractEnd").value ;
	if ($.trim(name).length==0){
		alert("请输入合同名称！！！");
		return false;
	}
	if ($.trim(contractCustomer).length==0){
		alert("请输入客户名！！！");
		return false;
	}
	if ($.trim(trafficContractDate).length==0){
		alert("请输入合同签订时间！！！");
		return false;
	}
	if ($.trim(trafficContractSummarize).length==0){
		alert("请输入合同概述！！！");
		return false;
	}
		if ($.trim(trafficContractAmount).length==0){
		alert("请输入合同金额！！！");
		return false;
	}
		if ($.trim(trafficContractStart).length==0){
		alert("请输入合同开始时间！！！");
		return false;
	}
		if ($.trim(trafficContractEnd).length==0){
		alert("请输入合同结束时间！！！");
		return false;
	}
	if(contract.upload.value == ""){
		alert("请上传文件！");
		contract.upload.focus();
		return false;
	}
	return true;
}

function checkamount(){
	var trafficContractAmount=document.getElementById("trafficContractAmount").value;
	var regu = "^[0-9]+$"; 
	if (trafficContractAmount.search(regu) != -1) { 
		return true; 
} 
	else { 
		alert("请将合同金额输入为数字！！！");
		return false; 
} 
}